<%@ page language="java" import="java.util.*,java.sql.*"
	pageEncoding="utf-8"%>
<%@ page import="start.fly.test.database.DBConn"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>查询</title>
<script src="../js/jquery-2.1.4.js"></script>
<script src="../js/common.js"></script>
<link href="../css/style4.css" rel="stylesheet" type="text/css" />
<link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css"
	rel="stylesheet">
<script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
</head>
<body>
	<div style="width: 530px; margin: 100px auto;">
		<div class="search_box">
			<span class="left l_bg"></span> <span class="right r_bg"></span>
			<div class="search">
				<form name="search_form" action="" method="post">
					<div id="pt1" class="select">
						<a id="s0">商品</a>
						<div style="display: none;" id="pt2" class="part">
							<p>
								<a id="s1">个人会员</a> <a id="s2">企业会员</a> <a id="s3">管理员</a>
							</p>
						</div>
					</div>
					<input id="catid" name="catid" type="hidden" value="7"> <input
						id="q" class="enter" name="ProductID"
						onFocus="if(this.value=='根据产品编号来查询'){this.value='';}else{this.select();}this.style.color='black';"
						value="根据产品编号来查询"> <input class="sb" name="Input"
						type="submit" value="">
				</form>
			</div>
		</div>
	</div>
	<%
		String ProductID = request.getParameter("ProductID");
		if (ProductID != null) {
			DBConn conn = new DBConn();
			String sql = "SELECT * FROM goodinfo	WHERE ProductID=?";
			try {
				PreparedStatement stmt = (PreparedStatement) conn.getCon()
						.prepareStatement(sql);
				stmt.setString(1, ProductID);
				ResultSet rs = stmt.executeQuery();
	%>
	<table class="table table-bordered">
		<thead>
			<tr>
				<th>产品编号</th>
				<th>产品版本</th>
				<th>产品类型</th>
				<th>产品描述</th>
				<th>添加时间</th>
				<th>路径</th>
				<th>所需积分</th>
			</tr>
		</thead>
		<%
			while (rs.next()) {
		%>
		<tbody>
			<tr>
				<td><%=rs.getString("ProductID")%></td>
				<td><%=rs.getString("Version")%></td>
				<td><%=rs.getString("PType")%></td>
				<td><%=rs.getString("Content")%></td>
				<td><%=rs.getDate("addTime")%></td>
				<td><%=rs.getString("URL_1")%></td>
				<td><%=rs.getInt("needIntegral")%></td>
			</tr>
		</tbody>
		<%
			}
		%>
	</table>
	<%
		conn.close();
			} catch (SQLException e) {
				e.printStackTrace();
			}

		}
	%>
</body>
</html>
